package com.openget.lang;
import org.w3c.dom.*;
import com.openget.util.XmlUtil;

public final class ElementLocator {

	public static ElementModel[] getConditions(ElementModel em) {
		
		NodeList nodeList = (NodeList)XmlUtil.SelectNodes("/*", em.getSourceElement());
		
		return new ElementModel[] { };
	}

	public static ElementModel[] getStrategys(ElementModel em) {
		return new ElementModel[] { };
	}

	public static ElementModel[] getTraps(ElementModel em) {
		return new ElementModel[] { };
	}

	public static ITrapableElement[] getTrapables(ElementModel em) {
		return new ITrapableElement[] { };
	}

	public static TextElement getText(ElementModel em) {
		return new TextElement(XmlUtil.SelectSingleNode("*", em.getSourceElement()));
	}
	/*    
    public Element getAttribute(String name) {
    	return (Element)XmlUtil.SelectSingleNode(name, this.sourceElement);
    }
    
    public <T extends OpengetElement> T[] getFurther(String name, Class<T> clazz) {
    	NodeList list = (NodeList)XmlUtil.SelectNodes("/" + name, this.sourceElement);
    	T[] further = (T[])new Object[list.getLength()];
    	for (int i = 0; i < list.getLength(); i++)
    		further[i] = new T((Element)list.item(i));
    	return further;
    }
	 */
}
